#ifndef CFG_H
#define CFG_H

#include "dist.h"
#include "sleep_api.h"

#ifdef __cplusplus
extern "C" {
#endif

#if DIST_VER == 3
#include "cfg_v3.h"
#elif DIST_VER == 4
#include "cfg_v4.h"
#endif

#define SLEEP_HR_SD_THRESHOLD 15

#define MIN_SD_DATA_SIZE 3
#define MIN_JUDGMENT_SLEEP_TIME 30
#define STANDARD_DEVIATION_CALCULATE_USE_INTERVAL 1
#define MIN_STANDARD_DEVIATION_AMOUNT 3
#define MAX_HEART_RATE_INTERVAL 20
#define SLEEP_RANGE_MERGE_TIME (1 * 60 * 60 * 1000)
#define SLEEP_FRAGMENT_MIN_NAP_TIME (1 * 60 * 60 * 1000)

#define NREM1_REM_STEPS_DIFF_THRESHOLD (get_smp_interval() * 1)

#define SLEEP_MOTION_SD_THRESHOLD (get_smp_interval() * 10)

#define SLEEP_WAKE_LEAST_MOTION_THRESHOLD (get_smp_interval() * 0)
#define MIN_AMOUNT_SLEEP_WAKE_LEAST_MOTION_THRESHOLD                           \
  (MIN_JUDGMENT_SLEEP_TIME / 2 / get_smp_interval())

#define NOTUSED(V) ((void)V)

#ifdef __cplusplus
}
#endif

#endif